//
//  WJBelowCollectionViewCell.m
//  WJBSApp
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 王景伟. All rights reserved.
//

#import "WJTopCollectionViewCell.h"

@implementation WJTopCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.lablel = [[WJBaseLable alloc]init];
        [self.contentView addSubview:self.lablel];
        self.lablel.font = [UIFont systemFontOfSize:14];
        self.lablel.textAlignment = NSTextAlignmentCenter;
        
        self.sliderLable = [[UILabel alloc]init];
        [self.contentView addSubview:self.sliderLable];
        self.sliderLable.backgroundColor = BSRedColor;
        self.sliderLable.hidden = YES;
    }
    return self;
}


- (void)layoutSubviews {
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:17]};
    
    CGRect rect = [self.lablel.text boundingRectWithSize:CGSizeMake(1000, 40) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    self.lablel.frame = CGRectMake(10, 0, rect.size.width , 37);
    
    self.sliderLable.frame = CGRectMake(10, 37,rect.size.width, 3); 
}
@end
